package cn.myzqu.sign.message.client;

import cn.myzqu.sign.common.response.ResultData;
import cn.myzqu.sign.message.common.input.MessageInput;
import org.springframework.web.bind.annotation.*;

import javax.validation.Valid;
import javax.validation.constraints.NotNull;

@RequestMapping("/message")
public interface MessageClient {

    @PostMapping("/info")
    ResultData addMessage(@RequestBody @Valid MessageInput messageInput);

    @PutMapping("/readStatus/{id}")
    ResultData changeReadStatus(@PathVariable @NotNull(message = "id不能为空") Integer id);

    @GetMapping("/list/user")
    ResultData getMessageByUserId(@RequestParam Integer userId,
                                  @RequestParam(defaultValue = "1") Integer current,
                                  @RequestParam(defaultValue = "10" ) Integer size);



}
